Simple
by Bill Bumgarner

Overview

This example demonstrates how to take advantage of many of the features provided by the 3Dkit.  It does this through a subclass of N3DCamera called SimpleCamera. This class controls a very simple 3D environment featuring:
	- Light Sources
		- ambient light
		- point light  (close to the surface being lit with an intensity less than or equal to 1.0-- though light sources do accept intensities over 1.0, Pixar strongly recommends against intensity values over 1.0)
	- Surface Shader
		- simple matte surface, color turned off by default so that it  tracks quickly on a B&W machine (the code to turn on color is included, but commented out)
	- Shaded surface rendering.  Drops to wireframe when being manipulated by the mouse. 
	- A simple scene w/a Torus (though the code to draw a teapot are included and commented out).
 - Use of the N3DRotator class to intuitively control 3D rotations via the mouse.
 - Saving of RIB code to a file (along with a custom "Display..." command)

Classes defined within Simple

SimpleCamera
The SimpleCamera is a subclass of N3DCamera (which is a subclass of the View class).  SimpleCamera creates the scene, including the shader, the light sources, and the N3DRotator instance within its initFrame: method.  It also specifies what surface type should be used.  SimpleCamera also supports saving of RIB code to a file via that dumpRib: method that is the target of a menu item in InterfaceBuilder.  SimpleCamera implements a custom mouseDown: method that tracks the mouse in a modal loop and rotates the scene via a modal loop.  When tracking the mouse, SimpleCamera specifies that surfaces should be rendered as wireframe to make the mouse tracking more responsive.

SimpleShape
SimpleShape is a subclass of N3DShape that implements a single method;  renderSelf:, that calls RiTorus.  The code needed to generate the classic teapot is also included.